//package spider;
//
//import com.alibaba.fastjson.JSONArray;
//import com.alibaba.fastjson.JSONObject;
//import org.apache.http.HttpEntity;
//import org.apache.http.HttpResponse;
//import org.apache.http.client.ClientProtocolException;
//import org.apache.http.client.HttpClient;
//import org.apache.http.client.methods.CloseableHttpResponse;
//import org.apache.http.client.methods.HttpGet;
//import org.apache.http.client.methods.HttpUriRequest;
//import org.apache.http.impl.client.CloseableHttpClient;
//import org.apache.http.impl.client.DefaultHttpClient;
//import org.apache.http.impl.client.HttpClients;
//import org.apache.http.util.EntityUtils;
//
//import javax.lang.model.util.Elements;
//import javax.swing.text.Document;
//import java.io.*;
//import java.util.*;
//
//public class Spider {
//    public static int smallestDifference(int[] a, int[] b) {
//        Arrays.sort(a);
//        Arrays.sort(b);
//        long ans = Integer.MAX_VALUE;
//        for(int i = a.length - 1;i>=0;i--){
//            long res = findMidIndex( a[i], b);
//            ans = Math.min(ans,res);
//        }
//        return  (int)ans;
//
//
//
//
//    }
//    public static long findMidIndex(int house,int[] heaters){
//        int start = 0;
//        int end = heaters.length - 1;
//        long min = Integer.MAX_VALUE;
//
//        while(start <= end){
////            System.err.println(house);
//            int mid = start + ((end - start) >>1);
//            long dis = Math.abs((long)heaters[mid] - (long)house);
//            if(dis == 0){
//                return dis;
//            }
//            if(dis < min){
//                min = dis;
//
//                if(heaters[mid] > house){
//                    end = mid - 1;
//                }else{
//                    start = mid + 1;
//                }
//
//            } else if(dis >= min){
//                if(heaters[mid] > house){
//                    end = mid - 1;
//                }else{
//                    start = mid + 1;
//                }
//            }
//        }
//
//        return min;
//    }
////    public static int findRadius(int[] houses, int[] heaters) {
////        int res = 0;
////        Arrays.sort(houses);
////        Arrays.sort(heaters);
////
////        for(int j = 0;j<houses.length;j++){
////            int x = 0;
////            if(houses[j] <= heaters[0]){
////                x = heaters[0] - houses[j];
////            }else if(houses[j] >= heaters[heaters.length - 1]){
////                x = houses[j] - heaters[heaters.length - 1];
////            }else {
////                x = findMidIndex(houses[j],heaters);
////            }
////            res = Math.max(res,x);
////            if (houses[j] == 161379218){
////                System.err.println(houses[j]);
////            }
////        }
////        return res;
////
////    }
//    public static void main(String[] args) {
//        String a = "";
//
//        char[] b ;
// //       a.join("",b);
//
////        args[0].charAt();
//        int[] houses = {-2147483648,1};
//        int[] hearts =  {2147483647,0};
//        System.err.println(smallestDifference( houses,  hearts));
//
//
//
////        try {
////            getHttp();
////        } catch (IOException e) {
////            throw new RuntimeException(e);
////        }
//    }
//    public static void getHttp() throws IOException {
//        //创建HttpClient对象
//        CloseableHttpClient httpClient = HttpClients.createDefault();
//        //创建HttpGet请求
//
//        HttpGet httpGet = new HttpGet("https://search.jd.com/Search?keyword=华为&enc=utf-8&wq=华为&pvid=263738ccc49944da910491d40f80afa7");
//        httpGet.setHeader("User-Agent","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0");
//        httpGet.setHeader("Cookie","_ns=NS1.2.1848196226.1653460535; _iuqxldmzr_=32; _ntes_nnid=2330cb7d119ec1b127b01fa1dd0e649a,1654004915486; _ntes_nuid=2330cb7d119ec1b127b01fa1dd0e649a; NMTID=00OvQ_YN4SLeI0TiEBIou24nMGYI0EAAAGBGmAfEg; WEVNSM=1.0.0; WNMCID=neyons.1654004915763.01.0; WM_NI=o2LYDLIqrXErOXGBbeWzqL5vN+pHKY6gUGtO6jI+rmzqH/WxVrhEyJXEWIOT6BJChWgJLiQ3CDjIDk9853CQHxakeyfH+Cf1oqCIlH64jd1JhU9oraFHm3vkklmUDiZacEg=; WM_NIKE=9ca17ae2e6ffcda170e2e6eeaced21a5efa6d1db7a969e8bb6c44e928b8b83c15bb59583acc15a9b8d8c8bf72af0fea7c3b92aadee84bac7488bafbeb9c87a8d8889a3e16f95a6bfadb87e8ef5c0a9ca53f6b99ba8f745f6b687ccf167baaf88d0d67496aea8a6fc429c9b99aace60f69e86a4eb5da596848ad439819ca6aac761fbe8fbd4c25b8ca8af8ce873a698e5a4e53badaf8daaef44f6eca685b442ac8bf790f16b8698a3d4f561a9b4a3b6c7639abfada6e637e2a3; WM_TID=/zUSS3Ghlg5EUERVEQKUQwLYeVEYDCm9; JSESSIONID-WYYY=F5C3ZBHB5T\\mActAht4\\PwOAQyH2e2hE2ItuawOaYKUrm\\RWuxiXktA+zwge4TjYnZiSH9RabPr8iVS9icj0exhnVcT/7D3\\dGknnSsQ/OPUlGDc4sENBk\\f1ZN+IGGmJ9jcegT8BTyfJKWYPVqTmfS8kDhoO8zyrNYJCzG7QH3Kk3Ms:1654010200114");
//
//
//        CloseableHttpResponse response = null;
//        try {
//            //使用HttpClient发起请求
//            response = httpClient.execute(httpGet);
//            //判断响应状态码是否为200
//            if (response.getStatusLine().getStatusCode() == 200) {
//                //如果为200表示请求成功，获取返回数据
//                String content = EntityUtils.toString(response.getEntity(), "UTF-8");
//                //打印数据长度
//                System.out.println(content);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        } finally {
//            //释放连接
//            if (response == null) {
//                try {
//                    response.close();
//                } catch (IOException e) {
//                    e.printStackTrace();
//                }
//                httpClient.close();
//            }
//        }
//    }
//
//}
